export const data = {
  namespaced: true,
  state: {
    List: [], //储存的数据
    Recharge: [], //充值的金额
    ifBankCar: true,
    ifShows: true,
  },
  mutations: {
    //银行卡数据
    setList(state, actions) {
      state.List = actions;
    },
    //控制弹框
    updateIfShow(state, actions) {
      state.ifBankCar = actions;
    },
    //控制充值金额
    updateIfShows(state, actions) {
      state.ifShows = actions;
    },
    //管钱的
    setRecharge(state, actions) {
      state.Recharge = actions;
    },
    //冲值的方法
    addRecharge(state, actions) {
      let flag = []; //定义一个空数组
      console.log(flag, "flag");
      flag = state.Recharge.findIndex((item) => {
        return item === actions;
      });
      state.Recharge.push(actions);
      console.log(state.Recharge, "1");
    },
  },
};
